package com.jiayang.hhotel.bean;

import android.content.Context;
import android.telephony.TelephonyManager;

import com.jiayang.hhotel.R;
import com.jiayang.hhotel.app.App;
import com.jiayang.hhotel.util.LogUtil;
import com.jiayang.hhotel.util.StringUtil;

/**
 * Created by Administrator on 2017/5/23 0023.
 * 常量数据类
 */

public class Constant {
    //错误时的占位图
    public static final int SEAL_NET_ERROR_IMG = R.mipmap.ic_error;
    //没有数据时的占位图
    public static final int SEAL_NO_DATA_IMG = R.mipmap.ic_launcher;
    //手机唯一标识
    private static String IMEI = "";
    public static String getIMEI(){
        if(StringUtil.isEmpty(IMEI)){
            TelephonyManager manager = (TelephonyManager) App.getContext().getSystemService(Context.TELEPHONY_SERVICE);
            IMEI = manager.getDeviceId();
            LogUtil.showLog("IMEI="+IMEI);
        }
        return IMEI;
    }
    //保存到本地的权限列表对象key值
    public static final String JURISDICTION_SHARED_KEY = "JURISDICTION_SHARED_KEY";
    //需要刷新的列表每次刷新固定需要请求的数量
    public static final int PAGE_COUNT = 6;
    //暂时预留
    public static final long PHONE=18737164294L;
    //保存用户名到本地的key
    public static final String USER_NAME="USER_NAME";
    //使用intent传递对象时的key
    public static final String INTENT_PROJECT_KEY="INTENT_PROJECT_KEY";
    //使用intent传递int的key
    public static final String INTENT_INT_KEY = "INTENT_INT_KEY";
    //使用intent传递string的key
    public static final String INTENT_STRING_KEY = "INTENT_STRING_KEY";
    //启动camera的requestCode
    public static final int REQUEST_CODE_START_CAMERA=1000;
    //启动album的requestCode
    public static final int REQUEST_CODE_START_ALBUM=1001;
    //语言的flag(中文)
    public static final int LAUGUAGE_FLAG_CHINESE=0;
    //语言的flag(英文)
    public static final int LAUGUAGE_FLAG_CENGLISH=1;
    //客房物品返回时的result值
    public static final int GUEST_ROOM_THING_RESULT_CODE=1002;
    //跳转至客房物品的request值
    public static final int GUEST_ROOM_THING_REQUEST_CODE=1003;
    //没有数据时的图片
    public static final int NO_DATA_PICTURE=R.mipmap.ic_error;
    //网络超时时的图片
    public static final int TIME_OUT_PICTURE=R.mipmap.ic_launcher;
    //网络链接失败时的图片
    public static final int NET_ERROR_PICTURE=R.mipmap.ic_launcher;

}
